package com.example.graduation.entity.pojo;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * @author Jeffery
 * Job实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("job")
public class Job implements Serializable {
    @ApiModelProperty(value = "职位ID")
    @TableId(value = "job_id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "职位类别")
    @TableField(value = "job_category")
    private String category;

    @ApiModelProperty(value = "职位名称")
    @TableField(value = "job_name")
    private String name;

    @ApiModelProperty(value = "职位简介")
    @TableField(value = "job_description")
    private String description;

    @ApiModelProperty(value = "职位部门")
    @TableField(value = "job_department")
    private String department;

    /**
     * 0  全职
     * 1  兼职
     * 2  实习
     */
    @ApiModelProperty(value = "职位性质")
    @TableField(value = "job_property")
    private int property;

    @ApiModelProperty(value = "职位薪水范围")
    @TableField(value = "job_salary")
    private String salary;

    @ApiModelProperty(value = "职位经验")
    @TableField(value = "job_experience")
    private String experience;

    @ApiModelProperty(value = "职位要求")
    @TableField(value = "job_needing")
    private String needing;

    @ApiModelProperty(value = "职位福利")
    @TableField(value = "job_weal")
    private String weal;

    @ApiModelProperty(value = "公司ID")
    @TableField(value = "company_id")
    private String cId;

    @ApiModelProperty(value = "发布者ID")
    @TableField(value = "user_id")
    private String uId;

    @ApiModelProperty(value = "公司地址")
    @TableField(value = "address_id")
    private String addressId;

    @ApiModelProperty(value = "职位创建时间")
    @TableField(value = "job_create_time", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp createTime;

    @ApiModelProperty(value = "职位修改时间")
    @TableField(value = "job_update_time", fill = FieldFill.INSERT_UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp updateTime;

    @ApiModelProperty(value = "职位version")
    @TableField(value = "job_version")
    private int version;

    @ApiModelProperty(value = "逻辑删除 0:未删除 1:已删除")
    @TableField(value = "job_has_deleted")
    private int isDeleted;

    @TableField(select = false)
    private Address address;

    @TableField(select = false)
    private Company company;

}
